package com.aijk.commons.entity;

import java.util.HashMap;

public class RetMsg extends HashMap {

    public RetMsg() {
        this.put("code", 0);
        this.put("msg", "正常");
    }

    public RetMsg(int code) {
        if (code == 0) {
            this.put("code", 0);
            this.put("msg", "正常");
        }else{
            this.put("code", code);
        }
    }

    public RetMsg(int code, String msg) {
        this.put("code", code);
        this.put("msg", msg);
    }

    public void setResult(int code, String msg) {
        this.put("code", code);
        this.put("msg", msg);
    }
}

